home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
tptc17sc.zip
/
KEYPRESS.INC
< prev
next >
Wrap
Text File
|
1988-03-25
|
502b
|
23 lines
(* -------------------------------------------------------- *)
function ReadKey: Char;
var
reg: registers;
begin
reg.ax := $0700; {direct console input}
msdos(reg);
ReadKey := chr(reg.al);
end;
(* -------------------------------------------------------- *)
function KeyPressed: Boolean;
var
reg: registers;
begin
reg.ax := $0b00; {ConInputStatus}
msdos(reg);
KeyPressed := (reg.al = $FF);
end;